package com.dykj.fireFighting.api.base.news.service;

import com.dykj.fireFighting.api.base.bigdata.device.vo.DeviceVo;
import com.dykj.fireFighting.api.base.emergency.entity.EmergencyStaff;
import com.dykj.fireFighting.api.base.news.dto.AliMessageDto;
import com.dykj.fireFighting.api.base.news.entity.AliMessage;
import com.dykj.fireFighting.common.core.service.IBaseService;
import com.dykj.fireFighting.common.core.vo.PageVo;

import java.io.UnsupportedEncodingException;
import java.util.List;

public interface IAliMessageService extends IBaseService<AliMessage> {

    /**
     * 火情短信发送接口
     *
     * @param socialName
     * @param socialLocation
     * @param socialAddress
     * @param ztfssj
     * @param name
     * @param location
     * @param phone
     * @param deviceName
     * @return
     */
    String sendFireMessage(String socialName, String socialLocation, String socialAddress, String ztfssj, String name, String location, String phone, String deviceName) throws UnsupportedEncodingException;


    /**
     * @param phone        待发送手机号
     * @param signName     短信签名-可在短信控制台中找到
     * @param templateCode 短信模板-可在短信控制台中找到
     * @param device       单位名称+设备位置`
     * @param time         发生时间
     * @return
     */
    int sendAliMessage(String phone, String signName, String templateCode, String unitName, String device, String time,String unitid,String receiver,String componentStatus);


    /**
     * 语音服务
     *
     * @param calledShowNumber 被叫显号
     * @param calledNumber     被叫号码
     * @param ttsCode          Tts模板ID
     * @param device           单位名称+设备名称
     * @param time             发生时间
     * @return
     */
    int sendAliVoice(String calledShowNumber, String calledNumber, String ttsCode, String device, String time,String unitid,String receiver, String unitName);
    /**
     * 批量发送语音服务
     *
     * @param calledShowNumber 被叫显号
     * @param calledNumbers     被叫号码list
     * @param ttsCode          Tts模板ID
     * @param device           单位名称+设备名称
     * @param time             发生时间
     * @return
     */
    void batchSendAliVoice(String calledShowNumber, List<String> calledNumbers, String ttsCode, String device, String time,String unitid);
    void batchSendAliMessage(List<String> phones, String signName, String templateCode, String unitName, String device, String time,String unitid);

    void sendAliMessageBatch(List<EmergencyStaff> emergencyStaffList, String signName, String templateCode,String device,String time,String componentStatus);
    void sendAliVoiceBatch(String calledShowNumber,List<EmergencyStaff> emergencyStaffList,String ttsCode, String device, String time);
    List<AliMessage> selectInfo(String s);

    List<AliMessage> selectByCenter(List<String> ids);

    PageVo<AliMessage> queryList(AliMessageDto aliMessageDto);

    void updateAliMessage(String errmsg, String bizid);

    void updateAliVoiceCall(String statusCode,String callId);
}
